<template>
	<view class="container">
		<view class="list-box">
			<view class="list-item-box">
				<view class="list-item-label">高考年份</view>
				<view class="list-item-num">{{info.year}}年</view>
			</view>
			<view class="list-item-box">
				<view class="list-item-label">院校代码</view>
				<view class="list-item-num">{{info.universityCode}}</view>
			</view>
			<view class="list-item-box">
				<view class="list-item-label">院校名称</view>
				<view class="list-item-num">{{info.universityName}}</view>
			</view>
			<view class="list-item-box">
				<view class="list-item-label">专业代号</view>
				<view class="list-item-num">{{info.majorId}}</view>
			</view>
			<view class="list-item-box">
				<view class="list-item-label">专业名称</view>
				<view class="list-item-num">{{info.majorName}}</view>
			</view>
			<view class="list-item-box">
				<view class="list-item-label">计划专业数</view>
				<view class="list-item-num">{{info.studentNum}}人</view>
			</view>
			<view class="list-item-box">
				<view class="list-item-label">学费标准（元/年）</view>
				<view class="list-item-num">{{info.tuition}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { http } from '../../utils'
	
	export default {
		data() {
			return {
				curIndex: 0,
				isShowBox: [true, false],
				params: {
					id : ''
				},
				info: []
			}
		},
		onLoad(options) {
			this.params.id = options.id;
			this.fetchList(this.params);
		},
		methods: {
			
			tapItem(e) {
				this.isShowBox[this.curIndex] = false
				this.curIndex = e.currentTarget.dataset.index
				this.isShowBox[this.curIndex] = true
			},
			fetchList(data) {
				http('/enrollment-plan/detail',
					data, {
						hideLoading: false,
						hideMsg: true,
						method: 'POST'
					}).then(
					res => {
						this.info = res.data.data;
					}).catch(
					err => {
						console.error(err)
					})
			}
		}
	}
</script>

<style>
	.container {
		width: 750rpx;
		height: auto;
	}
	
	.list-box {
		background-color: #ffffff;
		width: 750rpx;
		height: auto;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-top: 20rpx;
		font-size: 28rpx;
	}
	
	.list-item-box {
		width: 690rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		height: 90rpx;
		border-bottom: solid 1rpx #f5f5f5;
	}
	
	.list-item-label {
		color: #5683ec;
	}
</style>
